<template>
  <div>
    <div class="box" @mouseenter="fn">按钮</div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      num: 0,
      str: '我是data中的str',
    }
  },
  methods: {
    fn() {
      console.log(this.str)
    },
  },
}
</script>

<style scoped></style>
